-- GENERATED SPELL FOR [Sorceress Kaylana] --


function spell0_31051(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(31743,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31051', 573, 1)
end

function spell1_31051(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(31741,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31051', 15348, 1)
end

function Sorts_31051(pUnit, Event)
local choix_sorts_31051 = math.random(0, 1)
if choix_sorts_31051 == 0 then
pUnit:RegisterEvent('spell0_31051', 1, 1)
end
if choix_sorts_31051 == 1 then
pUnit:RegisterEvent('spell1_31051', 1, 1)
end
end

function mob31051_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31051', math.random(1500, 3000), 1)
end

function mob31051_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31051_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31051_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31051, 1, 'mob31051_Action')
RegisterUnitEvent(31051, 2, 'mob31051_Leave')
RegisterUnitEvent(31051, 3, 'mob31051_Kill')
RegisterUnitEvent(31051, 4, 'mob31051_Die')
